﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using microCRM.Domain;

namespace microCRM
{
    public partial class microCRM : Form
    {
        public microCRM()
        {
            InitializeComponent();
            DBHelper.Configure();
        }

        private void lbl_newContract_Enter(object sender, EventArgs e)
        {
            this.lbl_newContract.ForeColor = Color.Blue;
        }

        private void lbl_newContract_MouseLeave(object sender, EventArgs e)
        {
            this.lbl_newContract.ForeColor = Color.Black;
        }

        private void lbl_newContract_Click(object sender, EventArgs e)
        {
            Form f = new Form();
            f.MdiParent = this;
            f.Show();
        }

        private void tsmi_Exit_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Вы действительно хотите выйти?", "ВНИМАНИЕ", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
            { Application.Exit(); }
        }

        private void tsmi_NewContract_Click(object sender, EventArgs e)
        {
            NewContract newContract = new NewContract();
            newContract.MdiParent = this;
            newContract.Show();
        }

        private void systemCareToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SystemCareLogin loginForm = new SystemCareLogin();
            loginForm.Show();
        }

    }
}
